#pragma once
#include "Ray.h"
#include "Scene.h"
#include "ColorReflect.h"
#include "RayTrace.h"
class Intersection
{

public:
	static void Init(Scene * _Scene);
	static ColorReflect * Do_Intersection_Shape(Ray * _Ray, int bounce);
	static ColorReflect * Do_Intersection_Light(Ray * _Ray, int shape, Ray * observer);

	static Ray * Calculate_Cam_Ray(float screenX, float screenY);
	static float Calculate_Sphere_Intersection(Ray * _ray, SceneObject * shape);
	static float Calculate_Triangle_Intersection(Ray * _ray, SceneObject * shape);

	static Ray * Calculate_Sphere_Ray(Ray * _Ray, float t , SceneObject * shape);
	static Ray * Calculate_Triangle_Ray( Ray * _Ray, float t, SceneObject * shape);
	static Ray * Calculate_Reflexive(Ray * eye_ray , Ray * ref_ray);

	static float GetTriangleArea(Vector V0, Vector V1, Vector V2);
	static Vector GetINormal(SceneObject * shape, Vector impact);


	static bool init;

	static Scene * m_Scene;

	static Vector pos;
	static Vector lookat;
	static Vector up;
	static Vector right;
	static Camera mycam;
	static float near2;
	static float angle;
	static float tangen;
	static float aspect;
};




